#!/usr/bin/env python
# -*- coding:utf-8 -*-

class Foo():
    def __init__(self,hostname,port,user,passwd,db):
        self.hostname=hostname
        self.port=port
        #......
    def fetch(self):
        #连接,self.hostname,self.passwd....
    def update(self):
        pass
obj=Foo('1.1.1.1','3306','root','123456','test')
obj.fetch()